package com.gewu.ordlelist.database.dbdao;

import android.content.Context;

import com.gewu.ordlelist.database.MyDatabase;
import com.gewu.ordlelist.database.dbbean.footers;
import com.gewu.ordlelist.database.dbbean.mores;
import com.gewu.ordlelist.utils.SqliteHelpr;
import com.j256.ormlite.dao.Dao;

import java.sql.SQLException;
import java.util.List;

public class moreDao implements SqliteHelpr {

    private Dao<mores, Integer> footers;

    public moreDao(Context context) {
        try {
            this.footers = MyDatabase.getInstance(context).getDao(mores.class);
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }

    @Override
    public int add(Object bean) {
        try {
            footers.create((mores) bean);
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return 0;
    }

    @Override
    public int delect() {
        return 0;
    }

    @Override
    public int delectFoId(Object id) {

        return 0;
    }

    @Override
    public void inserts() {
    }

    @Override
    public void update(Object bean) {

    }

    @Override
    public List<mores> quer() {
        List<mores> byCars1 = null;
        try {
            byCars1 = footers.queryForAll();
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return byCars1;
    }

    @Override
    public List<?> querLike(String values) {
        return null;
    }
}
